﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using PiscoSourPersistencia;
using PiscoSourDominio;

namespace PiscoSourRESTServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Locales" in code, svc and config file together.
    public class Locales : ILocales
    {
        private LocalDAO dao = new LocalDAO();

        public Local ObtenerUsuarioLocal(string codigo)
        {
            return dao.ObtenerUsuarioLocal(codigo);            
        }

        public Local ObtenerLocal(string codigo)
        {
            return dao.ObtenerLocal(int.Parse(codigo));
        }

        public List<Local> ListaLocales()
        {
            return dao.ListarLocales().ToList();
        }
    }
}
